-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Build: Fix slow tests #773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
JAVA-4145
| } | ||
| } | ||
|
|
||
| task testSlowGroovy(type: Test) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to create a custom task just for the groovy tests and that fixes the issue ?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thats's what seem to be suggested as the solution, which is unfortunate: spockframework/spock#1288 (comment).
| } | ||
|
|
||
| task testSlowOnly(type: Test) { | ||
| dependsOn('testSlowGroovy') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the spock test dependency
| import static com.mongodb.ClusterFixture.getSslSettings | ||
| import static com.mongodb.internal.connection.CommandHelper.executeCommand | ||
|
|
||
| @IgnoreIf({ System.getProperty('ignoreSlowUnitTests') == 'true' }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a legacy system property
| def 'should throw a MongoSocketOpenException when the AsynchronousSocket Stream fails to open'() { | ||
| given: | ||
| def connection = new InternalStreamConnectionFactory( | ||
| def connection = new InternalStreamConnectionFactory(ClusterConnectionMode.SINGLE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are just to bring the code up to date.
|
|
||
| then: 'it prunes the existing connections and again ensures the minimum size of the pool' | ||
| connectionFactory.createdConnections.size() == 10 | ||
| connectionFactory.createdConnections.size() == 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a test bug.
| class ClientSideEncryptionBsonSizeLimitsSpecification extends FunctionalSpecification { | ||
|
|
||
| private final String collectionName = 'ClientSideEncryptionBsonSizeLimitsSpecification' | ||
| private final String collName = 'ClientSideEncryptionBsonSizeLimitsSpecification' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side effect of Spock dependency update? Theres a getCollectionName method in the FunctionalSpecification and spock complained they clashed.
stIncMale
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thank you @rozza! 💪
| } | ||
| } | ||
|
|
||
| task testSlowGroovy(type: Test) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thats's what seem to be suggested as the solution, which is unfortunate: spockframework/spock#1288 (comment).
jyemin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
JAVA-4145
https://spruce.mongodb.com/version/610bebf90ae606191fe957b7 - for the slow tests